import request from "@/config/request";

export function createOrder(data) {
    return request({
        url: '/order/createOrder',
        method: 'post',
        data: data
    })
}

export function createSeckillOrder(params, data) {
    return request({
        url: '/seckill/createSeckillOrder',
        method: 'post',
        params: params,
        data: data
    })
}

export function getOrderList() {
    return request({
        url: '/order/getOrderListByUserId',
        method: 'post'
    })
}

export function getOrderDetail(params) {
    return request({
        url: '/order/getOrderById',
        method: 'post',
        params: params
    })
}

export function updateOrder(data) {
    return request({
        url: '/order/updateOrder',
        method: 'post',
        data: data
    })
}
